package com.smart.wap.app;

import cn.dev33.satoken.annotation.SaCheckLogin;
import com.smart.common.entities.ajax.AjaxResult;
import com.smart.common.entities.constant.SmartConstant;
import com.smart.service.im.ImService;
import com.smart.utils.MemberAcl;
import com.smart.utils.MemberStp;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.RequiredArgsConstructor;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;


/**
 * @author Administrator
 */

@Api(tags = "移动端-IM相关接口")
@RestController
@RequestMapping(SmartConstant.WAP_API_PREFIX + "im")
@RequiredArgsConstructor
public class ImController {
    private final ImService imService;


    @ApiOperation(value = "获取用户签名")
    @GetMapping(value = "getUserSign")
    @SaCheckLogin(type = MemberStp.TYPE)
    public AjaxResult<String> getUserSign(){
        String userSig = imService.getUserSign(MemberAcl.getLoginId());
        return AjaxResult.data(userSig);
    }

}
